from django.conf.urls import url
from rest_framework.routers import DefaultRouter

from . import views


urlpatterns = [
    # 专栏分类
    url(r'^index/$',views.ColumnsListView.as_view()),
    # 专栏分类列表
    url(r'^index/(?P<column_id>\d+)/headlines/$',views.HeadlineListlView.as_view()),
    # 头条详情页
    url(r'^headlines/(?P<pk>\d+)/details/$',views.DetailView.as_view()),
    # 发布头条
    url(r'^send/details/$',views.SendHeadlineView.as_view()),
    # 获取主评论
    url(r'^details/(?P<headline_id>\d+)/comments/$',views.HeadlineCommentView.as_view()),
    # 发布评论
    url(r'^details/comments/$',views.SubCommentView.as_view()),
    # 获取子评论
    url(r'^others/(?P<headline_comment_id>\d+)/comments/$',views.OtherCommentsView.as_view()),
    # 发布子评论
    url(r'^others/comments/$',views.OtherSubCommentView.as_view()),
    # 获取热门头条
    url(r'^gethotheadline/$',views.GetHotHeadlineView.as_view()),
]




